import About from '../pages/About.vue'
import Home from '../pages/Home.vue'
import News from '../pages/News.vue'
import Message from '../pages/Message.vue'
import MessageDetail from '../pages/MessageDetail.vue'

export default [
    {
        path: '/about',
        component:About
    },
    {
        path: '/home',
        component:Home,
        children:[
            {
                // path:'/home/news',//两种写法都可以
                path:'news',
                component:News,
            },
            {
                path:'/home/message',
                component:Message,
                children:[
                    {
                        name:'MessageDetail',
                        path:'/home/message/detail/:id',
                        component:MessageDetail,
                    }
                ]
            }
        ]
    },
    // 重定向路径
    {
        path: '/',
        redirect: '/about'
      }
]